﻿<Page x:Class="BasicPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Converter="clr-namespace:Co9320.NamaAlert.Converter"
    Title="BasicPage">
    <Page.BindingGroup>
        <BindingGroup />
    </Page.BindingGroup>
    <Page.Resources>
        <Converter:TimeSpanToDoubleConverter x:Key="TimeSpanToDoubleConverter"/>
    </Page.Resources>
    <StackPanel>
        <GroupBox>
            <GroupBox.Header>
                <StackPanel Orientation="Horizontal">
                    <Image Source="../../Images/window_small.png" Style="{StaticResource SmallIconStyle}" VerticalAlignment="Center" />
                    <TextBlock Text="通知ウィンドウ" VerticalAlignment="Center" Margin="5 0 0 0" />
                </StackPanel>
            </GroupBox.Header>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>

                <TextBlock Text="表示時間:" VerticalAlignment="Center" Margin="0 0 5 0" />
                <Grid Grid.Column="1">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="50" />
                    </Grid.ColumnDefinitions>
                    <Slider x:Name="WindowDisplayTimeSlider" Maximum="30" Minimum="2" LargeChange="1" SmallChange="1"
                            IsSnapToTickEnabled="True" TickPlacement="BottomRight" Margin="0 5 0 5"
                            Value="{Binding BasicOptions.AlertWindowDisplayTime, Mode=TwoWay, UpdateSourceTrigger=Explicit, Converter={StaticResource TimeSpanToDoubleConverter}}" HorizontalAlignment="Stretch" />
                    <TextBlock Grid.Column="1" Text="{Binding Path=Value, ElementName=WindowDisplayTimeSlider, StringFormat=0秒, Mode=OneWay}" Margin="5 0 0 0" VerticalAlignment="Center" />
                </Grid>
            
                <TextBlock Grid.Row="1" Text="透明度:" VerticalAlignment="Center" />
                <Grid Grid.Row="1" Grid.Column="1">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="50" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="透明" VerticalAlignment="Center" />
                    <Slider x:Name="OpacitySlider" Grid.Column="1" Margin="5 5 0 5" Maximum="1.0" Minimum="0.1" LargeChange="0.1" 
                            IsSnapToTickEnabled="True" TickFrequency="0.1" TickPlacement="BottomRight" Value="{Binding BasicOptions.AlertWindowOpacity, Mode=TwoWay, UpdateSourceTrigger=Explicit}" HorizontalAlignment="Stretch" />
                    <TextBlock Grid.Column="2" Margin="5 0 0 0" Text="不透明" VerticalAlignment="Center" />
                    <TextBlock Grid.Column="3" Text="{Binding Path=Value, ElementName=OpacitySlider, StringFormat=0.0}" Margin="5 0 0 0" VerticalAlignment="Center" />
                </Grid>

                <TextBlock Grid.Row="2" Text="表示位置:" VerticalAlignment="Center" />
                <StackPanel Grid.Row="2" Grid.Column="1" Width="Auto">
                    <ComboBox SelectedIndex="0" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="10 3 5 3">
                        <ComboBoxItem Content="右下" />
                    </ComboBox>
                </StackPanel>

                    <Button Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Right" Margin="0 5 0 0" Width="100">
                    <StackPanel Orientation="Horizontal" Margin="0">
                        <Image Source="../../Images/window_small.png" Style="{StaticResource SmallIconStyle}" VerticalAlignment="Center" Margin="5 0 5 0" />
                        <Label Content="テスト" VerticalAlignment="Center" Margin="0 0 5 0" Padding="0" />
                    </StackPanel>
                </Button>
            </Grid>
        </GroupBox>


        <!--<GroupBox Margin="0 10 0 0" Visibility="Collapsed">
            <GroupBox.Header>
                <StackPanel Orientation="Horizontal">
                    <Image Source="../../Images/balloon_small.png" Style="{StaticResource SmallIconStyle}" VerticalAlignment="Center" />
                    <TextBlock Text="バルーン" VerticalAlignment="Center" Margin="5 0 0 0" />
                </StackPanel>
            </GroupBox.Header>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <TextBlock Text="表示時間:" VerticalAlignment="Center" Margin="0 0 5 0" />
                <Grid Grid.Column="1">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="50" />
                    </Grid.ColumnDefinitions>
                    <Slider x:Name="BalloonDisplayTimeSlider" Maximum="30" Minimum="2" LargeChange="1" SmallChange="1" Margin="0 5 0 5"
                            IsSnapToTickEnabled="True" TickPlacement="BottomRight" Value="{Binding BasicOptions.BalloonDisplayTime, Mode=TwoWay, UpdateSourceTrigger=Explicit, Converter={StaticResource TimeSpanToDoubleConverter}}" HorizontalAlignment="Stretch" />
                    <TextBlock Grid.Column="1" Text="{Binding Path=Value, ElementName=BalloonDisplayTimeSlider, StringFormat=0秒, Mode=OneWay}" Margin="5 0 0 0" VerticalAlignment="Center" />
                </Grid>
            </Grid>
        </GroupBox>-->

        
    </StackPanel>
</Page>
